extends layout

block content

    div.panel.panel-default
        div.panel-body
            table.table
                if participants && participants.length > 0
                    thead
                        tr
                            each value, key in participants[0]
                                th= key
                            th
                tbody
                    each row in participants
                        tr
                            each column in row
                                td= column
                            td
                                a(href="/Participations/#{prt_id}/#{row.ID}/delete"): span.glyphicon.glyphicon-trash

    div.panel.panel-default
        div.panel-body
            form.form-horizontal(method="post" action="/Participations/#{prt_id}/create")
                div.form-group
                    label.col-sm-2.control-label Person:
                    div.col-sm-10 
                        select.form-control(name="person")
                            each person in form.persons
                                option(value="#{person.ID}")= person.NAME
                div.form-group
                    label.col-sm-2.control-label Role:
                    div.col-sm-10 
                        select.form-control(type="date" name="role")
                            each role in form.roles
                                option(value="#{role.ID}")= role.TITLE
                div.form-group 
                    div.col-sm-offset-2.col-sm-10: button.btn.btn-primary(type="submit") Add

